<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Bootstrap Login Form Templates</title>

  <!-- CSS -->
  <link rel="stylesheet" th:href="@{/static/bootstrap/css/bootstrap.min.css}">
  <link rel="stylesheet" th:href="@{/static/css/app.css}">

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->

  <!-- Favicon and touch icons -->
  <link rel="shortcut icon" th:href="@{/static/ico/favicon.png}">

</head>

<body>

<div class="top">
  <h1>MCloud OAuth2授权</h1>
</div>

<div class="section-container">
  <div class="container layouts">
    <div class="row">
      <div class="col-sm-12 section-description">
        <h3>你确定授权给【<span th:text="${client.clientId}"></span>】吗？</h3>
      </div>
    </div>
    <div class="row">
      <div class="col-sm-10 col-sm-offset-1">
        <form id="confirmationForm" name="confirmationForm"
              th:action="@{/oauth/authorize}" method="post">
          <input name="user_oauth_approval" value="true" type="hidden"/>
          <ul class="list-unstyled">
            <th:block th:each="scope:${scopes}">
              <li>
                <div class="form-group">
                  <label th:text="${'Scope: '+ #strings.substringAfter(scope.key,'.')}"/> :
                  <input type="radio" th:name="${scope.key}" value="true"
                         th:checked="${scope.value}">同意</input>
                  <input type="radio" th:name="${scope.key}" value="false"
                         th:checked="${scope.value}">拒绝</input>
                </div>
              </li>
            </th:block>
          </ul>
          <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
          <button class="btn btn-primary">确定</button>
        </form>
      </div>
    </div>
  </div>
</div>

<div class="container footer">
  <div class="row">
    <div class="col-sm-12">
      &copy; Javaroad <a href="http://javaroad.me" target="_blank">MCloud</a>.
    </div>
  </div>
</div>

</body>

</html>